home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 13
/
CU Amiga Magazine's Super CD-ROM 13 (1997)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1997-08].iso
/
CUCD
/
Graphics
/
Ghostscript
/
man
/
man1
/
gs.0
next >
Wrap
Text File
|
1997-04-12
|
16KB
|
463 lines
GS(1) GS(1)
NNAAMMEE
gs - Aladdin Ghostscript interpreter/previewer
SSYYNNOOPPSSIISS
ggss [ _o_p_t_i_o_n_s ] [ _f_i_l_e_s ] ...
DDEESSCCRRIIPPTTIIOONN
Ghostscript is an implementation of Adobe Systems'
PostScript (tm) language, which is in turn similar to
Forth. _G_s reads _f_i_l_e_s in sequence and executes them as
Ghostscript programs. After doing this, it reads further
input from the standard input stream (normally the key-
board). Each line is interpreted separately. To exit
from the interpreter, enter the `quit' command. The
interpreter also exits gracefully if it encounters end-of-
file. Typing the interrupt character (e.g. Control-C) is
also safe.
The interpreter recognizes several switches described
below, which may appear anywhere in the command line and
apply to all files thereafter.
You can get a help message by invoking Ghostscript with
the --hh or --?? option. This message also lists the avail-
able devices.
Ghostscript may be built with multiple output devices.
Ghostscript normally opens the first one and directs out-
put to it. To use device xyz as the initial output
device, include the switch
-sDEVICE=xyz
in the command line. Note that this switch must precede
the first .ps file, and only its first invocation has any
effect. For example, for printer output in a normal con-
figuration that includes an Epson printer driver, you
might use the shell command
gs -sDEVICE=epson myfile.ps
instead of just
gs myfile.ps
Alternatively, you can type
(epson) selectdevice
(myfile.ps) run
All output then goes to the printer instead of the display
until further notice. You can switch devices at any time
by using the selectdevice procedure, e.g.,
(vga) selectdevice
or
(epson) selectdevice
As yet a third alternative, you can define an environment
variable GS_DEVICE as the desired default device name.
The order of precedence for these alternatives, highest to
lowest, is:
selectdevice
(command line)
23 September 1996 1
GS(1) GS(1)
GS_DEVICE
(first device in build list)
To select the density on a printer, use
gs -sDEVICE=<device> -r<xres>x<yres>
For example, on a 9-pin Epson-compatible printer, you can
get the lowest-density (fastest) mode with
gs -sDEVICE=epson -r60x72
and the highest-density mode with
gs -sDEVICE=epson -r240x72.
If you select a printer as the output device, Ghostscript
also allows you to control where the device sends its out-
put. Normally, output goes directly to a scratch file on
Unix systems. To send the output to a series of files
foo1.xyz, foo2.xyz, ..., use the switch
-sOutputFile=foo%d.xyz
The %d is a printf format specification; you can use other
formats like %02d. Each file will receive one page of
output. Alternatively, to send the output to a single
file foo.xyz, with all the pages concatenated, use the
switch
-sOutputFile=foo.xyz
On Unix systems, you can send the output directly to a
pipe. For example, to pipe the output to the command
`lpr' (which, on many Unix systems, is the command that
spools output for a printer), use the switch
-sOutputFile=\|lpr
You can also send output to stdout for piping with the
switch
-sOutputFile=-
In this case you must also use the -q switch, to prevent
Ghostscript from writing messages to stdout.
To find out what devices are available, type
devicenames ==
after starting up Ghostscript. Alternatively, you can use
the -h or -? switch in the command line; the help message
also lists the available devices.
To select a different paper size, use the command line
switch
-sPAPERSIZE=a_known_paper_size
e.g.,
-sPAPERSIZE=a4
or
-sPAPERSIZE=legal
As of this printing, the known paper sizes, defined in
gs_statd.ps, are: tab(>); l l l l l.
23 September 1996 2
() ()
PAPERSIZE>X">Y">X cm>Y cm _ 11x17>11">17">27.94>43.18
a0>33.0556">46.7778">83.9611>118.816
a10>1.02778">1.45833">2.61056>3.70417
a1>23.3889">33.0556">59.4078>83.9611
a2>16.5278">23.3889">41.9806>59.4078
a3>11.6944">16.5278">29.7039>41.9806
a4>8.26389">11.6944">20.9903>29.7039
a5>5.84722">8.26389">14.8519>20.9903
a6>4.125">5.84722">10.4775>14.8519
a7>2.91667">4.125">7.40833>10.4775
a8>2.05556">2.91667">5.22111>7.40833
a9>1.45833">2.05556">3.70417>5.22111
archA>9">12">22.86>30.48 archB>12">18">30.48>45.72
archC>18">24">45.72>60.96 archD>24">36">60.96>91.44
archE>36">48">91.44>121.92
b0>39.3889">55.6667">100.048>141.393
b1>27.8333">39.3889">70.6967>100.048
b2>19.6944">27.8333">50.0239>70.6967
b3>13.9167">19.6944">35.3483>50.0239
b4>9.84722">13.9167">25.0119>35.3483
b5>6.95833">9.84722">17.6742>25.0119
flsa>8.5">13">21.59>33.02 flse>8.5">13">21.59>33.02
halfletter>5.5">8.5">13.97>21.59
ledger>17">11">43.18>27.94 legal>8.5">14">21.59>35.56 let-
ter>8.5">11">21.59>27.94 note>7.5">10">19.05>25.4
IINNIITTIIAALLIIZZAATTIIOONN FFIILLEESS
When looking for the initialization files (gs_*.ps), the
files related to fonts, or the file for the `run' opera-
tor, Ghostscript first tries opening the file with the
name as given (i.e., using the current working directory
if none is specified). If this fails, and the file name
doesn't specify an explicit directory or drive (i.e.,
doesn't begin with `/' on Unix systems), Ghostscript will
try directories in the following order:
1. The directory/ies specified by the -I switch(es) in
the command line (see below), if any;
2. The directory/ies specified by the GS_LIB environ-
ment variable, if any;
3. The directory/ies specified by the GS_LIB_DEFAULT
macro in the Ghostscript makefile (which has been
set to
"/usr/local/share/ghostscript/M.N:/usr/local/share/ghostscript/fonts"
where M.N is the Ghostscript version number).
Each of these (GS_LIB_DEFAULT, GS_LIB, and -I parameter)
may be either a single directory, or a list of directories
separated by a `:'.
XX RREESSOOUURRCCEESS
Ghostscript looks for the following resources under the
1
() ()
program name `Ghostscript':
bboorrddeerrWWiiddtthh
The border width in pixels (default = 1).
bboorrddeerrCCoolloorr
The name of the border color (default = black).
ggeeoommeettrryy
The window size and placement, WxH+X+Y (default is
NULL).
xxRReessoolluuttiioonn
The number of x pixels per inch (default is com-
puted from WidthOfScreen and WidthMMOfScreen).
yyRReessoolluuttiioonn
The number of y pixels per inch (default is com-
puted from HeightOfScreen and HeightMMOfScreen).
uusseeBBaacckkiinnggPPiixxmmaapp
Determines whether backing store is to be used for
saving display window (default = true).
See the file `use.txt' for a more complete list of
resources.
To set these resources, put them in a file (such as
~/.Xresources) in the following form:
Ghostscript*geometry: 612x792-0+0
Ghostscript*xResolution: 72
Ghostscript*yResolution: 72
Then load the defaults into the X server:
% xrdb -merge ~/.Xresources
OOPPTTIIOONNSS
---- _f_i_l_e_n_a_m_e _a_r_g_1 _._._.
Takes the next argument as a file name as usual,
but takes all remaining arguments (even if they
have the syntactic form of switches) and defines
the name ARGUMENTS in userdict (not systemdict) as
an array of those strings, _b_e_f_o_r_e running the file.
When Ghostscript finishes executing the file, it
exits back to the shell.
--DD_n_a_m_e==_t_o_k_e_n
--dd_n_a_m_e==_t_o_k_e_n
Define a name in systemdict with the given defini-
tion. The token must be exactly one token (as
defined by the `token' operator) and must not con-
tain any whitespace.
2
() ()
--DD_n_a_m_e
--dd_n_a_m_e Define a name in systemdict with value=null.
--SS_n_a_m_e==_s_t_r_i_n_g
--ss_n_a_m_e==_s_t_r_i_n_g
Define a name in systemdict with a given string as
value. This is different from -d. For example,
-dname=35 is equivalent to the program fragment
/name 35 def
whereas -s name=35 is equivalent to
/name (35) def
--qq Quiet startup - suppress normal startup messages,
and also do the equivalent of -dQUIET.
--gg_n_u_m_b_e_r_1xx_n_u_m_b_e_r_2
Equivalent to --ddDDEEVVIICCEEWWIIDDTTHH==_n_u_m_b_e_r_1 and --ddDDEEVVIICCEE--
HHEEIIGGHHTT==_n_u_m_b_e_r_2.. This is for the benefit of devices
(such as X11 windows) that require (or allow) width
and height to be specified.
--rr_n_u_m_b_e_r
--rr_n_u_m_b_e_r_1xx_n_u_m_b_e_r_2
Equivalent to --ddDDEEVVIICCEEXXRREESSOOLLUUTTIIOONN==_n_u_m_b_e_r_1 and --ddDDEE--
VVIICCEEYYRREESSOOLLUUTTIIOONN==_n_u_m_b_e_r_2.. This is for the benefit
of devices (such as printers) that support multiple
X and Y resolutions. (If only one number is given,
it is used for both X and Y resolutions.)
--II_d_i_r_e_c_t_o_r_i_e_s
Adds the designated list of directories at the head
of the search path for library files.
-- This is not really a switch. It indicates to
Ghostscript that the standard input is coming from
a file or a pipe. Ghostscript reads from stdin
until reaching end-of-file, executing it like any
other file, and then continues processing the com-
mand line. At the end of the command line,
Ghostscript exits rather than going into its inter-
active mode.
Note that gs_init.ps makes systemdict read-only, so the
values of names defined with -D/d/S/s cannot be changed
(although, of course, they can be superseded by defini-
tions in userdict or other dictionaries.)
SSPPEECCIIAALL NNAAMMEESS
--ddDDIISSKKFFOONNTTSS
Causes individual character outlines to be loaded
from the disk the first time they are encountered.
(Normally Ghostscript loads all the character out-
lines when it loads a font.) This may allow load-
ing more fonts into RAM, at the expense of slower
3
() ()
rendering.
--ddNNOOCCAACCHHEE
Disables character caching. Only useful for debug-
ging.
--ddNNOOBBIINNDD
Disables the `bind' operator. Only useful for
debugging.
--ddNNOODDIISSPPLLAAYY
Suppresses the normal initialization of the output
device. This may be useful when debugging.
--ddNNOOPPAAUUSSEE
Disables the prompt and pause at the end of each
page. This may be desirable for applications where
another program is `driving' Ghostscript.
--ddNNOOPPLLAATTFFOONNTTSS
Disables the use of fonts supplied by the underly-
ing platform (e.g. X Windows). This may be needed
if the platform fonts look undesirably different
from the scalable fonts.
--ddSSAAFFEERR
Disables the deletefile and renamefile operators,
and the ability to open files in any mode other
than read-only. This may be desirable for spoolers
or other sensitive environments.
--ddWWRRIITTEESSYYSSTTEEMMDDIICCTT
Leaves systemdict writable. This is necessary when
running special utility programs such as font2c and
pcharstr, which must bypass normal PostScript
access protection.
--ssDDEEVVIICCEE==_d_e_v_i_c_e
Selects an alternate initial output device, as
described above.
--ssOOuuttppuuttFFiillee==_f_i_l_e_n_a_m_e
Selects an alternate output file (or pipe) for the
initial output device, as described above.
FFIILLEESS
//uussrr//llooccaall//sshhaarree//gghhoossttssccrriipptt//MM..NN//**
Startup-files, utilities, and basic font defini-
tions.
//uussrr//llooccaall//sshhaarree//gghhoossttssccrriipptt//ffoonnttss//**
Additional font definitions.
4
() ()
//uussrr//llooccaall//sshhaarree//gghhoossttssccrriipptt//MM..NN//eexxaammpplleess//**
Demo Ghostscript files.
//uussrr//llooccaall//sshhaarree//gghhoossttssccrriipptt//MM..NN//ddoocc//**
Assorted document files.
EENNVVIIRROONNMMEENNTT
GGSS__OOPPTTIIOONNSS
String of options to be processed before the com-
mand line options.
GGSS__DDEEVVIICCEE
Used to define the device used.
GGSS__FFOONNTTPPAATTHH
Path names used to search for fonts
GGSS__LLIIBB Path names for initialization files and fonts
TTEEMMPP Where temporary files are made
SSEEEE AALLSSOO
The various Ghostscript document files (above).
BBUUGGSS
See the network news group `comp.lang.postscript'.
5